package com.lyf.export.service.model;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;

/**
 * @author yangdong
 * @since 2021/3/29 16:42
 */
@Data
@NoArgsConstructor
public class AsyncExportTask {
    @Id
    private String id;
    @ApiModelProperty(value = "文件名")
    private String fileName;
    /**
     * 合伙人拉新引流数据导出 1
     * 合伙人拉新引流详情导出 2
     * 合伙人拉新引流全部历史记录导出 2
     */
    @ApiModelProperty(value = "导出类型")
    private int typeCode;
    @ApiModelProperty(value = "导出时间")
    private Long createTime;
    @ApiModelProperty(value = "导出状态 0 待导出 、 1 导出成功 2 导出失败")
    private int state;
    @ApiModelProperty(value = "失败原因")
    private String reason;
    @ApiModelProperty(value = "文件下载地址")
    private String url;
    @ApiModelProperty(value = "任务新建时间")
    private Long taskTime;
    /**
     * 1 导出 2 导入
     */
    @ApiModelProperty(value = "文件异步操作类型 1 导出 2导入")
    private Integer type;
    public AsyncExportTask(String fileName, int typeCode) {
        this.fileName = fileName;
        this.typeCode = typeCode;
    }
}
